﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class K9320
    {
        public K9320()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            InitializeComponent();
            SDSA = "9320";
        }
        public override void LOADALL()
        {
            base.LOADALL();
            if (SDSA.Length == 0) return;
            if (TBMain.Rows.Count > 0)
                return;
            if (DBSDDAT.ContainsKey(SDSA))
            {
                DBSDDAT.Remove(SDSA);
            }
            dwData = TBMain.NewRow();
            TMV.SetUpNewRow(ref dwData, SDSA);
            dwData["KEY"] = "1";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布M");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布M");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);
            dwData["KEY"] = "2";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("成品M");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("成品M");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "3";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布平米");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布平米");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);

            dwData["KEY"] = "4";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布平米");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布平米");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "5";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("原料KG");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("原料KG");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "6";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("成品KG");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("成品KG");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "7";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("个数");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("个数");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "8";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("匹数");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("匹数");
            dwData["VALUE"] = "000000000"; 
            TMV.Save(dwData); 
            LOADALL(); 
        }
    }
}
